package sandbox.domain;

import java.util.Collection;
import java.util.LinkedList;
import java.util.List;

public class Bar extends UniqueEntity {

    private String name;
    private Double longitude;
    private Double latitude;
    private Boolean enabled;
    private Integer counter;
    private List<FooBar> foobars = new LinkedList<FooBar>();

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Double getLongitude() {
        return longitude;
    }

    public void setLongitude(Double longitude) {
        this.longitude = longitude;
    }

    public Double getLatitude() {
        return latitude;
    }

    public void setLatitude(Double latitude) {
        this.latitude = latitude;
    }

    public Boolean getEnabled() {
        return enabled;
    }

    public void setEnabled(Boolean enabled) {
        this.enabled = enabled;
    }

    public Integer getCounter() {
        return counter;
    }

    public void setCounter(Integer counter) {
        this.counter = counter;
    }

    public Collection<FooBar> getFoobars() {
        return foobars;
    }

    public void setFoobars(Collection<FooBar> foobars) {
        this.foobars.clear();
        this.foobars.addAll(foobars);
    }
}
